package edu.pku.sei.autounit.generator;

import java.util.Date;

import edu.pku.sei.autounit.core.DefaultVariable;
import edu.pku.sei.autounit.core.Variable;
import edu.pku.sei.autounit.core.VariableFactory;
import edu.pku.sei.autounit.core.VariableGenerator;
import edu.pku.sei.autounit.filter.Filter;
import edu.pku.sei.autounit.reflect.Type;
import edu.pku.sei.autounit.util.NameFactory;
import edu.pku.sei.autounit.util.Statements;

public class StringGenerator implements VariableGenerator{
	
	public final static String []SEED = {"中文","english","한국어",(new Date()).toString(),Object.class.getName(),""}; 
	

	public Variable generate(Type type,String name,VariableFactory vf,NameFactory nf) {
		if(type.getFullName().equals(String.class.getName()))
			return new DefaultVariable(type,new Statements(),"\""+SEED[(int) (Math.random()*SEED.length)]+"\"");
		else
			return null;
	}

	
	public Variable generate(Type type, String name, Filter fliter,
			VariableFactory vf, NameFactory nf) {
		// TODO Auto-generated method stub
		return null;
	}
	

}
